package org.ocean.online.utils;

import org.apache.wicket.markup.MarkupType;
import org.ocean.online.wicket.BaseWebPage;

public class RedirectPage extends BaseWebPage{
	private static final long serialVersionUID = -3645752581311933093L;

	String url="";
	public RedirectPage(String url){
		this.url = url;
	}
	
	@Override
	public MarkupType getMarkupType() {
		MarkupType type = new MarkupType(".*","text");
		return type;
	}

	
	@Override
	public void renderPage() {
//		String url = this.getStringParam("url");
		String result = "<script type='text/javascript'>window.location='"+url+"'</script>";
		this.getResponse().write(result.getBytes());
	}
}
